import request from '@/utils/request'
import type { PermissionTreeNode } from '@/types/permission'

/**
 * 获取权限树
 */
export function getPermissionTree() {
  return request<PermissionTreeNode[]>({
    url: '/tenant/permission/tree',
    method: 'get',
  })
}

/**
 * 获取当前用户权限
 */
export function getUserPermissions() {
  return request<string[]>({
    url: '/tenant/permission/user',
    method: 'get',
  })
}

